/**
 * 
 */
package ccrClasses.layer1.immunizations;

import java.util.ArrayList;
import java.util.List;

import ccrClasses.CCR;
import ccrClasses.ICcr;

/**
 * @author matheus
 *
 */
public class Immunizations extends CCR implements ICcr{
	
	public static final String OPEN_TAG = "<Immunizations>";

	public static final String CLOSE_TAG = "</Immunizations>";
	
	private List<Immunization> immunizations;

	public Immunizations() {
		super();
		setImmunizations(new ArrayList<Immunization>());
	}

	@Override
	public String constructCcrString() {
		String ccr = BASE_OPEN_TAG + BODY_OPEN_TAG + OPEN_TAG;
		for(Immunization i: immunizations){
			ccr = ccr + i.constructCcrString();
		}
		
		ccr = ccr + CLOSE_TAG + BODY_CLOSE_TAG + BASE_CLOSE_TAG;
		return ccr;
	}

	/**
	 * @param immunizations the immunizations to set
	 */
	public void setImmunizations(List<Immunization> immunizations) {
		this.immunizations = immunizations;
	}

	/**
	 * @return the immunizations
	 */
	public List<Immunization> getImmunizations() {
		return immunizations;
	}
	
	

}
